<?php
/**
* Class CloneMain_Home_slider into Bo Controller
* @author SillySmart
* @copyright SillySmart
* @package Mvc.Controllers.Bo
* @see Mvc.Controllers.Bo.ControllerProtected
* @see Mvc.Controllers.SiteProtected
* @see Sls.Controllers.Core.SLS_GenericController
* @since 1.0
*
*/
class BoCloneMain_Home_slider extends BoControllerProtected
{
	public function init()
	{
		parent::init();
	}

	public function action()
	{
		$xml = $this->getXML();
		$boActions = SLS_BoRights::getDistinctActions();
		$xml->startTag("bo_actions");
		for($i=0 ; $i<$count=count($boActions) ; $i++)
		{
			$xml->startTag("bo_action");
				foreach($boActions[$i] as $key => $value)
					$xml->addFullTag($key,$value,true);
			$xml->endTag("bo_action");
		}
		$xml->endTag("bo_actions");
		
		// Check account rights
		$right = SLS_BoRights::isAuthorized("clone","Main_Home_slider",$this->_generic->getActionId());
		if ($right == -1)
			$this->_generic->redirect("Bo/Connection.sls");
		else if ($right == 0)
			$this->_generic->redirect("Bo/ListMain_Home_slider.sls");
		// /Check account rights
		
		$bo = new SLS_BoClone($this,"Home_slider","main",$xml);
		$bo->setUrlToRedirect("Bo","ListMain_Home_slider");
		$this->saveXML($bo->constructClone());
	}
}
?>